package com.zhang.springcloud.feignservice.controller;

import brave.propagation.ExtraFieldPropagation;
import com.zhang.springcloud.api.dto.Users;
import com.zhang.springcloud.api.feignservice.IUsersService;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhanghaolian
 * @date 2021/6/5 16:40
 */
@RestController
public class UsersServiceImpl implements IUsersService {
    @Override
    public Users getUserById(String id) {
        String bagageFidld = ExtraFieldPropagation.get("baggagefield");
        System.out.println(bagageFidld);
        Users users = new Users();
        users.setName("zhangSan");
        users.setAge(20);
        users.setHobby("吃饭");
        users.setSex(1);
        return users;
    }
}
